main.js ➔ ... ➔ .initialize   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 30

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 8.8571
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
require.config({
2
    paths: {
3
        sulucomment: '../../sulucomment/js',
4
        sulucommentcss: '../../sulucomment/css',
5
6
        'services/sulucomment/comment-manager': '../../sulucomment/js/services/comments/manager',
7
        'services/sulucomment/comment-router': '../../sulucomment/js/services/comments/router',
8
9
        'services/sulucomment/thread-manager': '../../sulucomment/js/services/threads/manager',
10
        'services/sulucomment/thread-router': '../../sulucomment/js/services/threads/router'
11
    }
12
});
13
14
define(function() {
15
16
    'use strict';
17
18
    return {
19
20
        name: 'Sulu Comment Bundle',
21
22
        initialize: function(app) {
23
24
            app.components.addSource('sulucomment', '/bundles/sulucomment/js/components');
25
26
            app.sandbox.mvc.routes.push({
27
                route: 'comments',
28
                callback: function() {
29
                    return '<div data-aura-component="comments/list@sulucomment"/>';
30
                }
31
            });
32
            app.sandbox.mvc.routes.push({
33
                route: 'comments/edit::id/:content',
34
                callback: function(id, content) {
0 ignored issues
show
Unused Code introduced by
The parameter content is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
35
                    return '<div data-aura-component="comments/edit@sulucomment" data-aura-id="' + id + '"/>';
36
                }
37
            });
38
39
            app.sandbox.mvc.routes.push({
40
                route: 'threads',
41
                callback: function() {
42
                    return '<div data-aura-component="threads/list@sulucomment"/>';
43
                }
44
            });
45
            app.sandbox.mvc.routes.push({
46
                route: 'threads/edit::id/:content',
47
                callback: function(id, content) {
0 ignored issues
show
Unused Code introduced by
The parameter content is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
48
                    return '<div data-aura-component="threads/edit@sulucomment" data-aura-id="' + id + '"/>';
49
                }
50
            });
51
        }
52
    };
53
});
54